import unittest,os

from config import DIR_PATH
from lib.HTMLTestRunner2 import HTMLTestRunner
# 定义测试套件
suite=unittest.defaultTestLoader.discover("./script")
# 设置报告位置，运行套件
filepath=DIR_PATH+os.sep+"report"+os.sep+"p2p.html"
with open(filepath,"wb") as f:
    HTMLTestRunner(stream=f,title="p2p投资接口测试报告").run(suite)